﻿namespace Resonator.Tests
{
	using Castle.ActiveRecord;
	using NHibernate;

	public class MockSessionScope : ISessionScope
	{
		public void Flush()
		{
		}

		public void Evict(object instance)
		{
		}

		public void RegisterSession(object key, ISession session)
		{
		}

		public bool IsKeyKnown(object key)
		{
			return false;
		}

		public ISession GetSession(object key)
		{
			return null;
		}

		public ISession OpenSession(ISessionFactory sessionFactory, IInterceptor interceptor)
		{
			return null;
		}

		public void FailSession(ISession session)
		{
		}

		public FlushAction FlushAction
		{
			get { return FlushAction.Never; }
		}

		public SessionScopeType ScopeType
		{
			get { return SessionScopeType.Custom; }
		}

		public bool WantsToCreateTheSession
		{
			get { return false; }
		}

		public void Dispose()
		{
		}
	}
}